#pragma once

#include "Constants.h"
#include "Hashtable.h"
#include "Operators.h"
#include <cstdlib>
#include "stdio.h"
#include "time.h"
#include "AlgorithmInterface.h"
#include <math.h>
#include "AStar2D.h"
#include "AWA2D.h"
#include "APTS2D.h"
#include "PTS2D.h"

class MainRunner
{
private:
	// Global variables
	int s[SIZE];                                        /* state in expanded form */
	void input(int state[SIZE]);
	int inputFromFile (int s[SIZE],FILE *f);
public:
	MainRunner();
	~MainRunner();
	int runForCost();
	int anytimeRun();

	bool runBoundedCostInstance(AlgorithmInterface* algorithm, int initialState[SIZE], int instanceCounter, int goalUpperbound);
	void runAnytimeInstance(AlgorithmInterface* algorithm, int initialState[SIZE], int instanceCounter);
	void outputResults(AlgorithmInterface* algorithm, int instance, int time, double solutionQuality=-1);
};
